<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<div id="result">
<?php echo $this->Session->flash(); ?>

<form method="post" id="add_category" action="<?php echo Configure::read('base_url')."add_category/shipping_cost/".$this->data['Category']['id'];?>">
<div class="div_header1">Shipping cost for "<?php echo $this->data['Category']['category_name'];?>"</div>
<table cellspacing="0" id="mytable">
    <tbody>
	  <tr>
		<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="125" valign="top">Fixed Shipping cost: $ </td><td>
				<input name="data[id]" type="hidden" id="textfield" value="<?php echo $this->data['Category']['id'];?>">
				<?php 
				if(isset($this->data['Category']['shipping_cost'])):
				echo $this->Form->input('shipping_cost',array('value'=>$this->data['Category']['shipping_cost'],'label'=>false,'size'=>10,'class'=>"required", 'title'=>"Enter shipping cost")); 
				else:
				echo $this->Form->input('shipping_cost',array('label'=>false,'size'=>10,'class'=>"required", 'title'=>"Enter shipping cost")); 
				endif;
				?>
			</td>
			<td colspan="2"><input type="submit" style="background:#73AE0B; color:#fff; font-size:14px;" name="button" id="button" value="Submit" /></td>
		  </tr>
		</table></td>
		</tr>
	</tbody></table>
</form>
</div>
<?php  echo $html->script(array("jquery.min.js","jquery.form.js","jquery.validate.js","jquery.pagination.js","jquery.tablesorter.min.js","jquery.tablednd.js")); ?>	 
 <script type="text/javascript">  
 jQuery(document).ready(function(){
 jQuery("#category_table").tablesorter({headers: { 2:{sorter: false},3:{sorter: false}, 4:{sorter: false}, 5:{sorter: false}}}); 
		
		var v = jQuery("#add_category").validate({
			submitHandler: function(form) {
				jQuery(form).ajaxSubmit({
					target: "#result"
				});
			}
		});		
		
//Check all
		$("#select_brand_all").click(function()				
			{
				var checked_status = this.checked;
				$("input[name=data[global_brand][]]").each(function()
				{
					this.checked = checked_status;
				});
			});
			$("#select_style_all").click(function()				
			{
				var checked_status = this.checked;
				$("input[name=global_style[]]").each(function()
				{
					this.checked = checked_status;
				});
			});
			$("#select_condition_all").click(function()				
			{
				var checked_status = this.checked;
				$("input[name=global_condition[]]").each(function()
				{
					this.checked = checked_status;
				});
			});
	});
 </script>
</body>
</html>